import { authRequest } from '@/utils/request'
//车辆列表接口
export const apiPostCarList = (data:{
    curPage?:number
    pageSize?:number
}) =>{
    console.log('👉 apiPostCarList 被调用，参数：', data) // 🔍 加日志
    //返回接口数据
     return authRequest<ApiPostCarListResp>({
        url:"/car/v1/query-list",
        method:"POST",
        data
     })
}
export interface ApiPostCarListResp {
    list: List[];
    total: number;
    [property: string]: any;
}

export interface List {
    carNo: string;
    id: number;
    [property: string]: any;
}
//车辆添加接口
export const apiPostCarAdd = (data:{
    parkNo:string
})  =>{
return authRequest({
    url:'/car/v1/add',
    method:'POST',
    data
})
}
//删除车辆
export const apiPostCarDelete =  (id:number)=>{
return authRequest({
    url:`/car/v1/delete/${id}`,
    method:'DELETE'
})
}
